<?php
namespace Admin\Model;
use Think\Model\ViewModel;

class StorageViewModel extends ViewModel {
    public $viewFields = array(     
    	'storage'=>array('id','sequence','number','date','sender','receive','status','code_code'=>'code','uid','del'),
    	'code'=>array('price','_on'=>'storage.code_code=code.code'), 
    	'goods'=>array('id'=>'goods_id','name'=>'goods_name','xinghao','unit','guige','_on'=>'code.goods_id=goods.id'),
    	'depot'=>array('id'=>'depot_id','name'=>'depot_name','_on'=>'code.depot_id=depot.id'), 
    	'supplier'=>array('id'=>'supplier_id','name'=>'supplier_name', '_on'=>'code.supplier_id=supplier.id'),
    	'manager'=>array('realname','_on'=>'storage.uid=manager.id')
	); 
}